<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>库存提醒</title>
	<%@ include file="/common/meta.jsp" %>
	<link href="${ctx}/css/table.css" type="text/css" rel="stylesheet"/>
	<script src="${ctx}/js/table.js" type="text/javascript"></script>
	<script src="${ctx}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
	<script>
		$(document).ready(function() {
			changeRadio();
		});
		function changeRadio(){

			var isappoint = $("'remindType':checked").val();
			if(isappoint=="true"){
				$("#amount").hide();
				$("#shelfLive").show();
			} else{
				$("#amount").show();
				$("#shelfLive").hide();
			}
		}
	</script>
</head>
<body>
	<table width="95%" class="noborder">
		<tr>
		<td align="left" ><div style="font-family:Arial;font-size:15px;font-weight:bold;font-style:normal">当前位置：校园诊所--库存提醒</div> </td>
		</tr>
	</table>
	<form id="mainForm" action="siremind.action" method="get">
	<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
	<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
	<input type="hidden" name="page.order" id="order" value="${page.order}"/>
	<div id="filter">
    </div>

	<table width="60%" class="noborder">
	    <tr>
	    	 <td>提醒方式:</td>
			 <td ><s:radio name="remindType" id="remindType"
						 list="#{true:'过期日期',false:'药品数量'}" listKey="key" 
						 listValue="value" theme="simple" onclick="changeRadio();"/></td>
			 <td id="shelfLive">过期日期：<input type="text" name="remindDate" value="<s:date name='remindDate' format='yyyy-MM-dd'/>" readonly="readonly" id="remindDate" size="9"
	    	 									onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'%y-%M-%d'})"/></td>
	    	 <td id="amount">药品数量：<input type="text" name="remindCount" value="${remindCount}" id="remindCount" size="9"/></td>
	    	 <td><input type="submit" value="查询"></input></td>
		</tr>
    </table>
	<div id="content">
		<table width="95%" border="1" id="customers">
			<tr>
				<th>序号</th>
				<th>入库单号</th>
				<th>入库日期</th>
				<th>有效期至</th>
				<th>药品名称</th>
				<th>规格</th>
				<th>数量</th>
			</tr>
			<s:iterator value="page.result">
			<tr>
				<td>${id}&nbsp;</td>
				<td>${purchaseBatch}&nbsp;</td>
				<td>${warehousingDate}&nbsp;</td>
				<td>${shelfLife}&nbsp;</td>
				<td>${drug.term}&nbsp;</td>
				<td>${unit}&nbsp;</td>
				<td>${amount}&nbsp;</td>
			</tr>
			</s:iterator>
		</table>
		<table width="95%" class="noborder">
		  <tr>
		  <td colspan="2"  align="right" >第${page.pageNo}页, 共${page.totalPages}页
			<a href="javascript:jumpPage(1)">首页</a>
			<s:if test="page.hasPre"><a href="javascript:jumpPage(${page.prePage})">上一页</a></s:if>
			<s:if test="page.hasNext"><a href="javascript:jumpPage(${page.nextPage})">下一页</a></s:if>
			<a href="javascript:jumpPage(${page.totalPages})">末页</a>
		  </td>
		  </tr>
		</table> 
	</div>
</form>		
</body>
</html>